function retInputValue(eid)
{
        if (document.getElementById(eid))
                if (document.getElementById(eid).value)
                        return document.getElementById(eid).value;
                else
                        return "";
} 
 function processForm()
  {
    //$('submit').disabled = true;
    //$('submit').value = "Processing.  Please Wait...";
	var postvar = 'comment=' + Base64.encode($('contact_form').comment.value) + '&name=' + $('contact_form').name.value + "&function=" + $('contact_form').func.value + '&code=' + $('contact_form').code.value;
	//alert(document.forms['contact_form'].elements[0].value);
	//alert($('contact_form').func.value);
	var aj = new Ajax.Request(
  'process.php', {
   method:'post',
   postBody: postvar,
   onSuccess:  function(transport)
      {
        if(transport.responseText.match(/^OK/) != null) {
          alert('Your comment has been posted');
          $('contact_form').reset();
		  window.location.reload( false );
        } else {
          alert(transport.responseText);
        }

        $('submit').value = 'Send Comment';
        $('submit').disabled = false;
      }
   }
  );
}

   /* $('contact_form').request({
      onSuccess: function(transport)
      {
        if(transport.responseText.match(/^OK/) != null) {
          alert('Your comment has been posted');
          $('contact_form').reset();
        } else {
          alert(transport.responseText);
        }

        $('submit').value = 'Send Comment';
        $('submit').disabled = false;
      }
    });

    return false;
  }*/
